package Inherit.package1;

public class BaseClass {
    private int privateVar = 1; // 仅在本类内可见
    int packagePrivateVar = 2; // 包内可见
    protected int protectedVar = 3; // 对于同一包内的类和所有子类可见
    public int publicVar = 4; // 对所有类可见

    public BaseClass() {
        // 构造方法
    }

    private void privateMethod() {
        System.out.println("Private Method");
    }

    void packagePrivateMethod() {
        System.out.println("Package-Private Method");
    }

    protected void protectedMethod() {
        System.out.println("Protected Method");
    }

    public void publicMethod() {
        System.out.println("Public Method");
    }
}
